home *** CD-ROM | disk | FTP | other *** search
/ Aminet 22 / Aminet 22 (1997)(GTI - Schatztruhe)[!][Dec 1997].iso / Aminet / dev / misc / gms_e.lha / GMSDev / EModules / graphics / screens.e < prev    next >
Text File  |  1997-09-15  |  5KB  |  120 lines

  1. /*
  2. **  $VER: screens.e V0.8B
  3. **
  4. **  Screen Definitions.
  5. **
  6. **  (C) Copyright 1996-1997 DreamWorld Productions.
  7. **      All Rights Reserved
  8. */
  9.  
  10. OPT MODULE
  11. OPT EXPORT
  12. OPT PREPROCESS
  13.  
  14. MODULE 'gms/dpkernel','graphics/blitter','system/register'
  15.  
  16. /****************************************************************************
  17. ** Screen object. 
  18. */
  19.  
  20. CONST SCRVERSION  = 1,
  21.       TAGS_SCREEN = $FFFB0000 OR ID_SCREEN
  22.  
  23. OBJECT screen
  24.     head[1]      :ARRAY OF head
  25.     memptr1      :LONG          -> Ptr to screen 1
  26.     memptr2      :LONG          -> Ptr to screen 2 (double buffer)
  27.     memptr3      :LONG          -> Ptr to screen 3 (triple buffer)
  28.     screenlink   :LONG          -> Ptr to a linked screen
  29.     palette      :LONG          -> Ptr to the screen palette
  30.     rasterlist   :LONG          -> Ptr to a rasterlist
  31.     amtcolours   :LONG          -> The amount of colours in the palette.
  32.     scrwidth     :INT           -> The width of the visible screen
  33.     scrheight    :INT           -> The height of the visible screen
  34.     picwidth     :INT           -> The width of the picture in pixels.
  35.     picbytewidth :INT           -> The width of the picture in bytes.
  36.     picheight    :INT           -> The height of the entire screen
  37.     planes       :INT           -> The amount of planes in da screen
  38.     scrxoffset   :INT           -> Hardware co-ordinate for TOS
  39.     scryoffset   :INT           -> Hardware co-ordinate for LOS
  40.     picxoffset   :INT           -> Offset of the horizontal axis
  41.     picyoffset   :INT           -> Offset of the vertical axis
  42.     attrib       :LONG          -> Special Attributes are?
  43.     scrmode      :INT           -> What screen mode is it?
  44.     scrtype      :INT           -> Interleaved/Planar/Chunky?
  45.     task         :LONG          -> R: Task that owns this screen.
  46.     planesize    :LONG          -> R: Size of a plane (bytewidth*height).
  47.     bitmap       :PTR TO bitmap
  48. ENDOBJECT
  49.  
  50. CONST BUFFER1 = 8,
  51.       BUFFER2 = 12,
  52.       BUFFER3 = 16
  53.  
  54. -> SCREEN ATTRIBUTES (attrib) 
  55.  
  56. CONST DBLBUFFER = $00000001,  -> For double buffering 
  57.       TPLBUFFER = $00000002,  -> Triple buffering!! 
  58.       PLAYFIELD = $00000004,  -> Set if it's part of a playfield 
  59.       HSCROLL   = $00000008,  -> Gotta set this to do scrolling 
  60.       VSCROLL   = $00000010,  -> For vertical scrolling 
  61.       SPRITES   = $00000020,  -> Set this if you want sprites 
  62.       SBUFFER   = $00000040,  -> Creates a scroll buff for up to 100 screens.
  63.       CENTRE    = $00000080,  -> Centres the screens (sets XOffset/YOffset).
  64.       BLKBDR    = $00000100,  -> Gives a blackborder on AGA machines 
  65.       NOSCRBDR  = $00000200   -> For putting sprites in the border 
  66.  
  67. -> SCREEN TYPES (type) 
  68.  
  69. CONST INTERLEAVED = 1,        -> These are actual numbers, not bits.
  70.       ILBM        = 1,
  71.       PLANAR      = 2, 
  72.       CHUNKY8     = 3,
  73.       CHUNKY16    = 4,
  74.       TRUECOLOUR  = 5
  75.  
  76. -> SCREEN MODES (mode) 
  77.  
  78. CONST HIRES   = $0001,     -> High resolution 
  79.       SHIRES  = $0002,     -> Super-High resolution 
  80.       LACED   = $0004,     -> Interlaced 
  81.       LORES   = $0008,     -> Low resolution (default) 
  82.       EXTRAHB = $0010,     -> Extra HalfBrite
  83.       SLACED  = $0020,     -> Super-Laced resolution.
  84.       HAM     = $0040      -> For HAM mode 
  85.  
  86. #define WAITLINE(a)         Shl(00,16) OR (a),0
  87. #define COLOUR(a,b)         Shl(02,16),(a),(b),0
  88. #define NEWPALETTE(a,b,c)   Shl(04,16),(a),(b),(c),0
  89. #define COLOURLIST(a,b,c,d) Shl(06,16) OR (a),Shl(b,16) OR (c),(d),0
  90. #define SPRITE(a)           Shl(08,16) OR (a),0
  91. #define SCROLL(a,b,c)       Shl(10,16) OR (a),Shl(b,16) OR (c),0
  92. #define FSCROLL(a,b,c,d)    Shl(12,16) OR (a),Shl(b,16) OR (c),Shl(d,16),0
  93. #define FLOOD               Shl(14,16),0
  94. #define REPOINT(a)          Shl(16,16),(a),0
  95. #define MIRROR              Shl(18,16),0
  96. #define RASTEND             $ffffffff
  97.  
  98. /* Screen tags */
  99.  
  100. CONST GSA_MEMPTR1      = TAPTR OR 12,
  101.       GSA_MEMPTR2      = TAPTR OR 16,
  102.       GSA_MEMPTR3      = TAPTR OR 20,
  103.       GSA_SCREENLINK   = TAPTR OR 24,
  104.       GSA_PALETTE      = TAPTR OR 28,
  105.       GSA_RASTERLIST   = TAPTR OR 32,
  106.       GSA_AMTCOLOURS   = TLONG OR 36,
  107.       GSA_SCRWIDTH     = TWORD OR 40,
  108.       GSA_SCRHEIGHT    = TWORD OR 42,
  109.       GSA_PICWIDTH     = TWORD OR 44,
  110.       GSA_PICBYTEWIDTH = TWORD OR 46,
  111.       GSA_PICHEIGHT    = TWORD OR 48,
  112.       GSA_PLANES       = TWORD OR 50,
  113.       GSA_SCRXOFFSET   = TWORD OR 52,
  114.       GSA_SCRYOFFSET   = TWORD OR 54,
  115.       GSA_PICXOFFSET   = TWORD OR 56,
  116.       GSA_PICYOFFSET   = TWORD OR 58,
  117.       GSA_SCRATTRIB    = TLONG OR 60,
  118.       GSA_SCRMODE      = TWORD OR 64,
  119.       GSA_SCRTYPE      = TWORD OR 66
  120.